package top.finen.miniweapp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.finen.miniweapp.entity.Book;
import top.finen.miniweapp.service.impl.BookServiceImpl;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api_v1/books")
public class BookController {

    @Autowired
    BookServiceImpl bookService;

    @RequestMapping("/test")
    public String test() {
        return "test";
    }

    @RequestMapping("/all")
    public List<Book> getAllBookInfo() {
        return bookService.getAllBook();
    }







}
